import request from '@/utils/request'
import {
	encrypt,
	decrypt
} from "@/utils/jsencrypt.js";
//查询小区列表
export function quarterList(query) {
	return request({
		url: '/app/mall/quarter/list',
		method: 'get',
		params: query
	})
}
// 获取小区详情
export function quarterInfo(query) {
	return request({
		url: '/app/mall/quarter/getInfo',
		method: 'get',
		params: query
	})
}
//获取小区动态海报
export function areaposter(query) {
	return request({
		url: '/app/mall/quarter/poster',
		method: 'get',
		params: query
	})
}
//收藏小区
export function showcollect(query) {
	return request({
		url: '/app/mall/collect/quarter/collect',
		method: 'get',
		params: query
	})
}

//批量取消收藏小区
export function cancelCollectBatch(data) {
	return request({
		url: '/app/mall/collect/quarter/collect/cancelBatch',
		method: 'post',
		data: data
	})
}

//查询小区管理列表
export function quarterManageList(query) {
	return request({
		url: '/app/mall/quarter/manage/list',
		method: 'get',
		params: query
	})
}

//租房-审核通过小区
export function quarterPass(data) {
	return request({
		url: '/app/mall/quarter/pass',
		method: 'get',
		params: data
	})
}

//租房-审核驳回小区
export function quarterReject(data) {
	return request({
		url: '/app/mall/quarter/reject',
		method: 'get',
		params: data
	})
}

//删除小区
export function deleteQuarter(ids) {
    return request({
        url: '/app/mall/quarter/'+ids,
        method: 'delete'
    })
}

//下架小区
export function offShelfQuarter(query) {
    return request({
       url: '/app/mall/quarter/offShelf',
       method: 'get',
       params: query
    })
}

//上架小区
export function onShelfQuarter(query) {
    return request({
        url: '/app/mall/quarter/onShelf',
        method: 'get',
        params: query
    })
}


//修改小区
export function updateQuarter(data) {
    return request({
        url: '/app/mall/quarter',
        method: 'put',
        data: data
    })
}

//新增小区
export function addQuarter(data) {
    return request({
        url: '/app/mall/quarter',
        method: 'post',
        data: data
    })
}

